package top.songxs.gmall.product.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import top.songxs.gmall.common.result.Result;
import top.songxs.gmall.common.result.ResultCodeEnum;
import top.songxs.gmall.product.dto.SpuInfoDto;
import top.songxs.gmall.product.entity.BaseSaleAttr;
import top.songxs.gmall.product.entity.SpuInfo;
import top.songxs.gmall.product.service.BaseSaleAttrService;

import java.util.List;

@RestController
@RequestMapping("admin/product")
public class BaseSaleAttrController {

    @Autowired
    private BaseSaleAttrService baseSaleAttrService;

    //http://api.gmall.com/admin/product/baseSaleAttrList
    @GetMapping("baseSaleAttrList")
    public Result<List<BaseSaleAttr>> findBaseSaleAttrList(){
        List<BaseSaleAttr> list = baseSaleAttrService.list();
        return Result.build(list, ResultCodeEnum.SUCCESS);
    }


}
